home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY-2.2 / SCENES / level2 / IORTEST < prev    next >
Text File  |  1993-09-28  |  3KB  |  106 lines

  1. // Persistence of Vision Raytracer
  2. // This file demonstrates the use of the file "ior.inc" and a few other
  3. // interesting and useful tricks.  It can take a bit of time to render,
  4. // (he said, understatingly), because of the transparency and because of
  5. // the 7 element light bank (flourescent tube?).  Eliminating some of the
  6. // lights (and adjusting the brightness color, "Watts", accordingly)
  7. // will help quite a bit.
  8.  
  9. #include "colors.inc"
  10. #include "shapes.inc"
  11. #include "textures.inc"
  12. #include "fov.inc"                  // Field of view constants
  13. #include "ior.inc"                  // Index of refraction constants
  14.  
  15. //max_trace_level 2                  // Use for faster debugging only!
  16. max_trace_level 4                  // This should be enough for these shapes
  17.  
  18.  
  19. camera {
  20.    location <0, 5, -20>
  21.    direction <0.0, 0.0, FoV_60>     // Use a 60o field of view
  22.    up  <0.0, 1.0, 0.0>
  23.    right <4/3, 0.0, 0.0>
  24.    look_at <0, 1, 0>
  25. }
  26.  
  27. // Assemble a bank of lights here, on the ground...
  28. #declare Watts = color Gray25
  29. #declare Light_Distance = -50
  30.  
  31. union {
  32.     light_source  { <-6, 0, Light_Distance>  color Watts  }
  33.     light_source  { <-4, 0, Light_Distance>  color Watts  }
  34.     light_source  { <-2, 0, Light_Distance>  color Watts  }
  35.     light_source  { < 0, 0, Light_Distance>  color Watts  }
  36.     light_source  { < 2, 0, Light_Distance>  color Watts  }
  37.     light_source  { < 4, 0, Light_Distance>  color Watts  }
  38.     light_source  { < 6, 0, Light_Distance>  color Watts  }
  39.  
  40.     rotate 60*x           // ... and hoist 'em up into the air
  41.  
  42.     pigment { White }  // Doesn't do anything but suppresses a parser warning
  43. }
  44.  
  45.  
  46. // Horozontally striped floor
  47. plane { y, -1
  48.    pigment {
  49.       checker color HuntersGreen color SummerSky
  50.       scale <32000, 1, 2>
  51.    }
  52.    finish {
  53.       ambient 0.1
  54.       diffuse 0.6
  55.    }
  56. }
  57.  
  58.  
  59. #declare Hummer =
  60. union {
  61.    // Chris Young's shape from textures.pov
  62.    union {
  63.       object { UnitBox }
  64.       object { Disk_Y translate 2*y }
  65.       sphere { <0, 4, 0>, 1 }
  66.       rotate 45*y
  67.    }
  68.  
  69.    // Let's attach an orange sphere to this thing... off in the distance,
  70.    // so it'll be automatically repeated as we repeat the rest of the
  71.    // object (see below)
  72.    sphere { <0, 5, 20>, 1 texture { finish { Shiny } pigment {Orange} } }
  73. }
  74.  
  75. // Set up a default texture for all objects that follow that don't already
  76. // have a texture of their own
  77. default { texture { Glass2 } }
  78.  
  79.  
  80. // Now lay out five of those Hummers
  81. object { Hummer
  82.    translate -6*x
  83.    finish { ior Diamond_Ior }
  84. }
  85.  
  86. object { Hummer
  87.    translate -3*x
  88.    finish { ior Flint_Glass_Ior }
  89. }
  90.  
  91. object { Hummer
  92.    translate 0*x
  93.    finish { ior Crown_Glass_Ior }
  94. }
  95.  
  96. object { Hummer
  97.    translate 3*x
  98.    finish { ior Water_Ior }
  99. }
  100.  
  101. object { Hummer
  102.    translate 6*x
  103.    finish { ior Air_Ior }
  104. }
  105. // end of file iortest.pov
  106.